﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link href="/Resources/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Resources/bootstrap-3.3.5/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/Resources/AdminTLE/css/AdminLTE.min.css" rel="stylesheet" />
    <link href="~/Resources/AdminTLE/css/skins/skin-blue-light.min.css" rel="stylesheet" />

    <script src="/Resources/Script/jquery.min.js"></script>
    <script src="/Resources/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script src="~/Resources/AdminTLE/js/app.min.js"></script>

    <title>考试系统</title>
</head>
<body class="hold-transition skin-blue-light sidebar-mini" style="font-family: Calibri;">
    <div class="wrapper">
        <header class="main-header">
            <!-- Logo -->
            <a href="/Login/Welcome" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini">TLE</span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg">Technical Level Evaluation</span>
            </a>
            <!-- Header Navbar -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only"></span>
                </a>
                <!-- Navbar Right Menu -->
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <li class="dropdown user user-menu">

                            <a role="button" href="#" title="Sign Out" style="padding: 11px 7px 10px 15px !important" data-toggle="modal" data-target="#myModal">
                                <i class="fa fa-sign-out fa-2x"></i>
                            </a>
                            <!-- Modal -->

                        </li>
                    </ul>
                </div>

            </nav>
        </header>

        <aside class="main-sidebar">
            <section class="sidebar">
                @{Html.RenderAction("MenuList", "Account");}
            </section>
        </aside>
        <div class="content-wrapper">
            <section class="content">
                @RenderBody()
            </section>
        </div>
        <footer class="main-footer">
            <div class="pull-right hidden-xs">
                <p>Copyright &copy; 2015-2016 Philips. All Rights Reserved.</p>
            </div>
        </footer>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content" style="border-radius:5px;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h3 class="modal-title" id="myModalLabel"><b>Reminder</b></h3>
                </div>
                <div class="modal-body">
                    Are you sure sign out?
                </div>
                <div class="modal-footer">
                    <a id="btnSignOut" type="button" class="btn btn-primary">Sure</a>
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
</body>
</html>
<script type="text/javascript">

    $(function () {
        $("#btnSignOut").click(function () {
            $.ajax({
                url: '/Account/LoginOut',
                type: 'post',
                dataType: 'text',
                success: function (data) {
                    if (data == "suc") {
                        top.location.href = "/Account/Login";
                    }
                },
                error: function () {
                    top.location.href = "/Account/Login";
                }
            });
        });
    });
</script>